<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">

    function Person (name, age, gender) {
        var o = new Object()
        // 可以在这里定义私有变量和函数
        o.sayName = function () {
            console.log(name)
        }
        return o
    }
    var shaheshang = new Person('沙悟净', '500', '男')
    shaheshang.sayName()

</script>

</body>
</html>
